#include "el.h"
#include "bolt.h"
#include "utils.h"
#include "builtin.h"

int g_debug=0;

void set_debug(int debug)
{
  g_debug=debug;
}


BOLT(debug, "cmd debug on")
{
  set_debug(1);
}

BOLT(undebug, "cmd debug off") 
{
  set_debug(0);
}

BOLT(exit, "exit")
{
  el_stop();
}

BOLT_PROFILE(debug, "", debug_profile, desc)
{
  if (g_debug)
    cmd_load_profile(desc, "cmd debug on");
  cmd_load_profile(desc, "\n");
}

void init_builtin(void)
{

}
